package panda.cardutil.other;




/**
 * Sandbox for testing random shit =)
 * 
 * @author zane.tian@gmail.com
 */
public class Sandbox {
	final static long appStartTime = System.currentTimeMillis();

	public static void main(String[] args) throws Exception {
		System.out.println("Loading at " + (System.currentTimeMillis() - appStartTime) + "ms\n-\n");
		
		System.out.println(fibonacci(8));
		
		System.out.println("\n-\nDone in: " + (System.currentTimeMillis() - appStartTime) + "ms");
	}
	
	public static int fibonacci(int n) {
		if(n==0 || n==1) {
			return 1;
		}
		
		int[] terms = new int[n];
		terms[0] = 1;
		terms[1] = 1;
		
		for(int i = 2; i < n; i++) {
			terms[i] = terms[i-1] + terms[i-2];
		}
		
		
		return terms[n-1];
	}
}